projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
947fed0
)
label: Fix another sizing corner case causing segfaults
author
Benjamin Otte
<otte@redhat.com>
Thu, 8 Nov 2012 22:15:19 +0000
(23:15 +0100)
committer
Benjamin Otte
<otte@redhat.com>
Thu, 8 Nov 2012 22:34:30 +0000
(23:34 +0100)
If the "wider" label is the smaller one, use the wider size for both
cases. This can happen when ellipsizing a single character, which is
often smaller than the ellipsizing glpyph(s).
gtk/gtklabel.c
patch
|
blob
|
history
diff --git
a/gtk/gtklabel.c
b/gtk/gtklabel.c
index a3c92838a7284ce5ebe47cdd700f409761ff3b9c..92f55b6c14402f1050e816bc96252a4d393e4fba 100644
(file)
--- a/
gtk/gtklabel.c
+++ b/
gtk/gtklabel.c
@@
-3557,7
+3557,8
@@
gtk_label_get_preferred_layout_size (GtkLabel *label,
*smallest = *widest;
}
- g_assert (widest->width >= smallest->width);
+ if (widest->width < smallest->width)
+ *smallest = *widest;
g_object_unref (layout);
}